<template>
  <div class="header">
    <van-icon

        name="arrow-left"
        size="1.3rem"
        color="white"
        @click="back"
    />

    <span>{{ this.$props.headerName }}</span>
  </div>
</template>

<script>
export default {
  name: "headerCom",
  props:["headerName"],
  methods:{
    back(){
      this.$router.back()
    }
  }

}
</script>

<style scoped lang="less">
.header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 999;
  box-sizing: border-box;
  height: 40px;
  width: 100%;
  background: #4bd863;
  font-size: 17px;
  line-height: 40px;
span {
  color: #fff;
  margin-left: 6px;
}
}
</style>
